<?php


namespace app\admin\controller;

class Redis extends Common
{
    public function all(){
        $list = redisObj()->hKeys('db');
        return view('',['list'=>$list]);
    }
    public function delKey(){
        $key = input('param.key');
        $type =  input('param.type',0);
        if($type ==1){
            return checkRes(redisObj()->del('db'),'删除所有');
        }else{
            return checkRes(redisObj()->hDel('db',$key),'删除');
        }
    }
    public function getKey(){
        $param = input('param.keys');
        echo redisObj()->hGet('db',$param);
    }
}